// 引入模块
import Vue from 'vue'
import Vuex from 'vuex'
// 引入home模块
import home from '@/store/modules/home'
import goods from '@/store/modules/goods'
import detail from '@/store/modules/detail'

// 2. 注册模块
Vue.use(Vuex)

// 3. 定义方法
const state = {}
const mutations = {}
const actions = {}
const getters = {}

// 4. 导出
export default new Vuex.Store({
  state,
  mutations,
  actions,
  getters,
  modules: { home, goods, detail }, // 注册模块
})
